This invention relates to an electronic timekeeping device, such as a timer, real-time clock, or the like that employs a crystal oscillator to generate a time-base signal, more specifically to an improved method of compensating for oscillator frequency error.
Electronic timekeeping devices are often built into audio and video equipment such as video cassette recorders, where they have the important function of enabling broadcasts to be recorded automatically at preset times. Needless to say, this function requires accurate timekeeping.
The crystal oscillator in an electronic timekeeping device is part of an oscillator circuit comprising resistors, capacitors, and other electronic circuit elements. The circuit oscillates at a frequency determined by the dimensions and characteristics of the crystal and of these other circuit elements. Although a crystal oscillates with a comparatively stable and accurate natural frequency, slight deviations of its natural frequency from the nominal value, as well as variations in resistance, capacitance, and other electrical characteristics in the oscillator circuit, can cause the output frequency of the oscillator circuit to deviate significantly from its intended value. Timekeeping errors exceeding a minute per month cannot be ruled out. Errors of this magnitude are unacceptable, so they must be corrected by adjusting the timekeeping device when it is manufactured.
One common method of adjustment employs a variable trimmer capacitor in the oscillator circuit, but this method is widely regarded as unsatisfactory. A trimmer capacitor is an expensive component, and it must be adjusted manually, a process which introduces human error and labor costs, takes time, and is inherently imprecise. Moreover, manual adjustment is apt to be a recurring nuisance, because if any component of the oscillator circuit is replaced, the adjustment must be performed again.
A known method of avoiding the problems of manual adjustment is to equip the timekeeping device with a programmable frequency divider controlled by a value stored in a non-volatile memory. The output frequency can then be adjusted by writing appropriate data in the non-volatile memory. According to one conventional version of this method, the non-volatile memory stores the full value of the frequency division ratio. According to another version, the non-volatile memory stores the deviation of this value from a nominal value.
Consider, however, the common case of a crystal with a natural frequency of approximately 4.194304 MHz, which is divided by approximately two to the twenty-second power (2.sup.22) to obtain a 1-Hz output signal. If the non-volatile memory stores the entire frequency division ratio, it must store a twenty-three bit value. Even if it stores only the deviation from the nominal value, to catch all possible deviations with a high degree of certainty, the non-volatile memory must still store a fairly large number of bits. The manufacturer may be quite confident that the frequency error will not exceed two hundred parts per million (.+-.200 ppm), for example, but for a 4.194304-MHz crystal this corresponds to .+-.839 Hz, so eleven bits must be stored (including one sign bit). It would be desirable to reduce the stored information to eight bits, so as to use up only one byte of non-volatile memory, but the maximum signed value that can be expressed in one byte is only .+-.127.